package com.zygh.policeasset.component;

import org.springframework.stereotype.Component;

@Component
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/component/ProjectCode.class */
public class ProjectCode {
    public String get(String type, String no, String year) {
        if (type == null || type.equals("") || no == null || no.equals("")) {
            return "";
        }
        StringBuffer code = new StringBuffer();
        if (type.equals("zn")) {
            code.append("ZNJT-");
        }
        if (type.equals("jc")) {
            code.append("JCJT-");
        }
        if (type.equals("zd")) {
            code.append("ZDJT-");
        }
        if (type.equals("qt")) {
            code.append("QTJT-");
        }
        code.append(year);
        code.append("-");
        for (int i = 0; i < 5 - no.length(); i++) {
            code.append("0");
        }
        code.append(no);
        return code.toString();
    }
}